package IC.AST.nodes;

import java.util.List;

import IC.AST.*;

/**
 * a virtual call
 */
public class VirtualCall extends FunctionCall {
	private Expression instance;	// the instance specifier

	/**
	 * @param instance the instance specifier
	 * @param methodID the method name
	 * @param line the node line number
	 * @param column the node column number
	 */
	public VirtualCall(Expression instance, List<Expression> args, 
			String methodID, String fileName, int line, int column) {
		super(methodID,args,fileName,line, column);
		this.instance = instance;
	}

	/**
	 * @return the instance specifier
	 */
	public Expression getInstance() {
		return this.instance;
	}

	public <D,U> U accept(PropogatingVisitor<D,U> v, D context) throws Exception {
		return v.visit(this,context);
	}
}
